<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>

<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.1.js"></script>

<script type="text/javascript">


    var person = {
        name : 'john',
        location: 'new york',
        hobbies : 'music'
    };

    var personDetails = {
        skill : "developer",
        homeTown: "hyderabad"
    }

    var course = 'javascript';
    console.log('initial person after declaration ' + person.name);
    function changePersonName(per,course){
        var clonedPerson = $.extend(personDetails,per);// clone, merging two objects
        clonedPerson.name = "amy"; // _.clone(per);//_.extend();
        course = 'angular';
        console.log('Inside Function ' +clonedPerson.name + ' and course is '+ course);
    }
    changePersonName(person,course);
    //pass by reference, copy by reference
    //pass by value  , copy by value
    console.log('outside person ' +person.name + ' and course is ' + course);

    <!-- JsonP -->
    //dataType: json
    //timeout:

    //ajax --> xmlhttprequest

    //abc.com xyz.com
    // cannot -- desktop --> cross domain error
    //cross origin policy not allowed

    //1->CORS (server side thing)

    //REQUEST ==> Header and body

    //2 --> JSONP

    //json padding -->script
    //get
    //http://xyz.com/GetEmployees?callBack=cb
    // cb({ person : {

    // })

    //qunit
    //jasmine unit testing framework

    //mocha.js

    //coffeescript




</script>
</body>
</html>